package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {
    /**
     * 批量删除菜品
     * @param ids
     * @return
     */
    List<Long> getSetmealDishById(List<Long> ids);

    /**
     * 新增套餐分类关系
     * @param setmealDishes
     */
    void insert(List<SetmealDish> setmealDishes);

    /**
     * 删除信息
     * @param setmealId
     */
    /**
     * 根据套餐id删除套餐和菜品的关联关系
     * @param setmealId
     */
    @Delete("delete from setmeal_dish where setmeal_id = #{setmealId}")
    void deleteBySetmealId(Long setmealId);



    @Select("select * from setmeal_dish where setmeal_id = #{id}")
    List<SetmealDish> getId(Long id);
}
